<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" >
    <h:head>
        <title>注册</title>
    </h:head>
    <h:body>
       <h:form>
         <h2>用户注册</h2>
         <h4>请提交注册信息</h4>
         <table>
            <tr>
                <td>姓:</td>
                <td>
                   <h:inputText label="First Name" 
                       id="fname" value="#{userBean.firstName}">
                    </h:inputText>
                    <h:message for="fname" />
                </td>
            </tr>
            <tr>
                <td>名:</td>
                <td><h:inputText label="Last Name"
                      id="lname" value="#{userBean.lastName}"/>
                    <h:message for="lname" />
                </td>
            </tr>
            <tr>
              <td>性别:</td>
              <td><h:selectOneRadio label="Sex" 
                        id="sex" value="#{userBean.sex}">
                    <f:selectItem itemLabel="男" itemValue="男" />
                    <f:selectItem itemLabel="女" itemValue="女" />
                  </h:selectOneRadio>
                  <h:message for="sex" />
              </td>
            </tr>
            <tr>
              <td>出生日期:</td>
              <td>
                 <h:inputText label="Date of Birth"
                       id="dob" value="#{userBean.dob}" >
                    <f:convertDateTime pattern="MM-dd-yyyy" />
                 </h:inputText> (mm-dd-yyyy)
                 <h:message for="dob" />
               </td>
            </tr>
            <tr>
                <td>邮箱地址:</td>
                <td><h:inputText label="Email Address"
                         id="email" value="#{userBean.email}" />
                    <h:message for="email" />
                </td>
            </tr>
         </table>
        <p><h:commandButton value="注册" action="done" /></p>
       </h:form>
    </h:body>
</html>

